import 'package:flutter/material.dart';
import 'package:inmotion_pro/l10n/local.dart';
import 'package:inmotion_pro/pages/mine/vehilce_list/auth_application_list/to_me/view.dart';
import 'package:lx_widgets_library/lx_widgets_library.dart';

import 'controller.dart';
import 'from_me/view.dart';

class VehicleAuthApplicationView
    extends BaseGetView<VehicleAuthApplicationController> {
  VehicleAuthApplicationView({super.key});

  @override
  String? get title => local.authorization_application;

  @override
  Widget buildBody(BuildContext context) {
    return Material(
        child: Column(
      children: [
        Container(
          color: Colors.black,
          child: TabBar(
            dividerColor: Colors.transparent,
            controller: controller.tabController,
            indicatorColor: LxCol.theme,
            labelColor: LxCol.theme,
            unselectedLabelColor: Colors.grey,
            tabs: <Widget>[
              Tab(text: local.authorization_sent),
              Tab(text: local.authorization_received),
            ],
          ),
        ),
        Expanded(
          child: TabBarView(
            controller: controller.tabController, //必要
            children: <Widget>[
              BindApplyFromMeView(),
              BindApplyToMeView(),
            ],
          ),
        )
      ],
    ));
  }
}
